<?php

function get_upload_error_message ($err) {
	switch($err) {
		case UPLOAD_ERR_INI_SIZE:
			return "Sorry, the server cannot accept a so big file.";
		case UPLOAD_ERR_FORM_SIZE:
			return "Sorry, the file is too big.";
		case UPLOAD_ERR_PARTIAL:
			return "The uploaded file was only partially uploaded. Please try again.";
		case UPLOAD_ERR_NO_FILE:
			return "No file was uploaded. Please select a file and try again.";
		case UPLOAD_ERR_NO_TMP_DIR:
			return "A temporary folder is missing. Please try again later.";
		case UPLOAD_ERR_CANT_WRITE:
			return "Failed to write on the server. Please try again later.";
	}
}

?>
